import { createApp } from 'vue'
import App from './App.vue'
import router from  './router/index'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as Icons from '@element-plus/icons-vue'
import { toLine } from './utils'
import mUI from './components'
import './mock'

const app = createApp(App)
//  安装图标组件
//  el改版了, 所有图标变成了组件,所以需要提前注册
for (let name in Icons) {
    // console.log((Icons as  any)[name]);
    app.component(`el-icon-${toLine(name)}`, (Icons as  any)[name])
}

app.use(router).use(ElementPlus).use(mUI)

app.mount('#app')

